package com.api.rc.lobby.message;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author RenQiang
 * @date 2021/7/17
 */
@Data
@NoArgsConstructor
public class LobbyMessage<T> {
    private LobbyEvent event;
    private String message;
    private T data;

    public LobbyMessage(LobbyEvent event, String message) {
        this.event = event;
        this.message = message;
    }

    public LobbyMessage(LobbyEvent event, T data) {
        this.event = event;
        this.message = "OK";
        this.data = data;
    }
}
